body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f5f5f5;
}

/* 头部容器样式 */
.header-container {
    text-align: center;
    /* padding: 10px 0; */
    /* background: #f8f9fa; */
    margin-bottom: 5px;
}

/* 主标题样式 */
.main-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 30px;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

/* 导航按钮样式 */
.nav-button {
    padding: 12px 24px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 场景管理页面样式 */
.scenario-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-title {
    color: #2c3e50;
    margin: 30px 0 20px;
    font-size: 1.8rem;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.form-label {
    min-width: 100px;
    text-align: right;
    font-weight: bold;
}

.form-control,
.form-select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
    height: 48px;
    box-sizing: border-box;
    background-color: white;
    line-height: 1.5;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.btn {
    padding: 10px 24px;
    height: 42px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
    display: inline-block;
}

.btn:hover {
    background: #0069d9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 首页测试功能样式 */
.test-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.test-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.test-controls .form-select {
    flex: 1;
    min-width: 300px;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.test-controls .btn {
    padding: 12px 24px;
}

.progress-container {
    margin-top: 10px;
    background: #e9ecef;
    border-radius: 3px;
    height: 6px;
}

.test-result {
    margin-top: 20px;
    display: none;
}

.test-status {
    margin-bottom: 20px;
}

.test-output {
    padding: 15px;
    background: white;
    border-radius: 4px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.test-output .log {
    padding: 8px 12px;
    margin-bottom: 5px;
    border-left: 3px solid #ddd;
}

.test-output .error {
    border-left-color: #dc3545;
    background: #f8d7da;
}

.test-output .success {
    border-left-color: #28a745;
    background: #d4edda;
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.screenshot-gallery img {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.screenshot-gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.test-result {
    margin-top: 20px;
    display: none;
}

.test-status {
    margin-bottom: 15px;
}

.progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background: #007bff;
    transition: width 0.3s ease;
}

.test-output {
    padding: 15px;
    background: white;
    border-radius: 4px;
    margin-bottom: 20px;
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.screenshot-gallery img {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.screenshot-gallery img:hover {
    transform: scale(1.05);
}

.sortable-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.sortable-list li {
    padding: 15px;
    background: #f8f9fa;
    margin-bottom: 10px;
    border-radius: 4px;
    cursor: move;
    transition: all 0.2s ease;
}

.sortable-list li:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

h1 {
    color: #2c3e50;
    text-align: center;
}

#app {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}

.sidebar {
    width: 400px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-content {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 600px;
}

#moduleList,
#elementList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#moduleList li,
#elementList li {
    padding: 16px;
    margin: 10px 0;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 操作按钮容器 */
.element-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.delete-btn {
    background: linear-gradient(135deg, #ff5555 0%, #ff0000 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    border: none;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.delete-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 50, 50, 0.4);
}

.delete-btn::before {
    content: "🗑";
    font-size: 1.4em;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
    transition: all 0.3s;
}

.delete-btn:hover::before {
    transform: rotate(-15deg) scale(1.1);
}

.delete-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-30deg);
    transition: left 0.8s ease-in-out;
}

.delete-btn:hover::after {
    left: 150%;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.delete-btn:active {
    animation: pulse 0.3s ease-out;
    transform: scale(0.95);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

button[type="submit"] {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button[type="submit"]:hover {
    background-color: #1a252f;
}

.btn {
    display: inline-block;
    background-color: #2c3e50;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    margin: 10px 0;
}

.btn:hover {
    background-color: #1a252f;
}

/* 场景管理样式 */
.scenario-controls {
    margin: 30px 0;
    display: flex;
    gap: 15px;
    align-items: center;
}

.new-scenario-form {
    display: flex;
    gap: 10px;
}

.new-scenario-form input {
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    min-width: 200px;
}

.new-scenario-form input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.scenario-controls select {
    flex: 1;
    max-width: 300px;
}

.sortable-list {
    list-style: none;
    padding: 15px;
    min-height: 200px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    margin: 20px 0;
}

.sortable-list li {
    padding: 12px 15px;
    background: white;
    margin-bottom: 8px;
    cursor: move;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.sortable-list li:hover {
    background: #f1f8ff;
    transform: translateX(5px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.sortable-list li:before {
    content: "≡";
    margin-right: 10px;
    color: #adb5bd;
}

.scenario-editor {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#saveScenario {
    background: #28a745;
    padding: 12px 25px;
    font-size: 16px;
}

#saveScenario:hover {
    background: #218838;
}

.delete-button {
    background: linear-gradient(to bottom, #ff3333, #cc0000);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.delete-button:hover {
    background: linear-gradient(to bottom, #ff4444, #dd0000);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.delete-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.delete-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: all 0.5s ease;
}

.delete-button:hover::after {
    left: 100%;
}

.element-details {
    margin-top: 10px;
}

.detail-row {
    display: flex;
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-label {
    font-weight: bold;
    min-width: 80px;
    color: #666;
}

.detail-value {
    word-break: break-all;
    flex: 1;
}

/* 左侧元素列表样式 */
#elementList {
    max-height: 70vh;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

/* 单个元素项样式 */
.element-item {
    margin: 3px 0;
    padding: 8px;
    border-bottom: 1px solid #eee;
    background-color: white;
    transition: all 0.2s;
}

.element-item:hover {
    background-color: #f0f0f0;
}

/* 滚动条样式 */
#elementList::-webkit-scrollbar {
    width: 6px;
}

#elementList::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

#elementList::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

/* 编辑按钮样式 - 修改为与删除按钮一致 */
.edit-button {
    background: linear-gradient(to bottom, #4CAF50, #2E7D32);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-right: 10px;
}

.edit-button:hover {
    background: linear-gradient(to bottom, #5CB85C, #3D8B3D);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.edit-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.edit-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: all 0.5s ease;
}

.edit-button:hover::after {
    left: 100%;
}

.module-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.module-left,
.module-right {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.sortable-list {
    min-height: 400px;
    list-style: none;
    padding: 0;
}

.sortable-list li {
    padding: 10px;
    margin: 5px 0;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: move;
}